var tamOriginal = "980";
window.onresize = ajustarTexto;
window.onload = ajustarTexto;
window.onload = init;

function ajustarTexto() {
	var tamActual = window.innerWidth;
	var proporcion = (tamActual / tamOriginal) * 100;
	//console.log(tamO);
	document.body.style.fontSize = proporcion + "%";
}

/*window.onload = function() {
	var boton = document.getElementById("boton");
	boton.onclick = function() {
		var nick = document.getElementById("nick");
		var email = document.getElementById("email");
		var password1 = document.getElementById("password1");
		var password2 = document.getElementById("password2");
		var re = /^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$/;

		if (password1.value != password2.value) {
			alert("Contrase�as distintas");
			document.registro.password1.focus();
			return 0;
		}
		if (!re.test(email.value)) {
			alert("Email incorrecto");
			document.registro.email.focus();
			return 0;
		}

		alert("Registro correctamente");
	}
}*/
/*function init(){
	document.getElementById("menu1").onmouseover = cambiaColor;
	document.getElementById("menu1").onmouseout = vuelveColor;
	document.getElementById("menu2").onmouseover = cambiaColor;
	document.getElementById("menu2").onmouseout = vuelveColor;
	document.getElementById("menu3").onmouseover = cambiaColor;
	document.getElementById("menu3").onmouseout = vuelveColor;
	document.getElementById("menu4").onmouseover = cambiaColor;
	document.getElementById("menu4").onmouseout = vuelveColor;	
	
}

function cambiaColor(e){
		e.target.style.border = "1px solid gray";
		e.target.style.borderRadius = "10px";
		e.target.style.boxShadow = "2px 2px black";
		e.target.style.paddingLeft = "5px";
		e.target.style.paddingRight = "5px";
		e.target.style.background = "#1A253B";
		e.stopPropagation();
}
function vuelveColor(e){
		e.target.style.border = "";
		e.target.style.boxShadow = "";
		e.target.style.borderRadius = "";
		e.target.style.background = "";
		e.stopPropagation();
}*/

